
#include <iostream>
#include<string>
using namespace std;
long long LCM(long long int n1, long long int n2) 
{
	int max;

	max = (n1 > n2) ? n1 : n2;

	do
	{
		if (max % n1 == 0 && max % n2 == 0)
		{
			return max;
			break;
		}
		else
			++max;
	} while (true);

	return 0;
}
int main()
{
	

	int N ;
	cin >> N;
	long long int* B = new long long int[N];
	int i,j,k,n ;
	long long int sult=0;
	for (i = 0; i < N; i++)
	{
		cin >> B[i];
	}
	for (i = 0; i < N; i++)
	{
		k = B[i];
		for (j = i+1; j < N; j++)
		{
			//cout<<LCM(B[i],B[j]) << " ";
			sult = sult + LCM(B[i], B[j]);
		}
	}
	cout << sult % 1000000007;
	

	
	
	
}




